<?php
require_once "StreamController.php";
class GetController extends Controller
{
	public function accessRules(){
		return array(
			array('allow', // allow authenticated user to perform 'create' and 'update' actions
				'actions'=>array(),
				'users'=>array('@'),
			),
			array('allow', // allow admin user to perform 'admin' and 'delete' actions
				'actions'=>array(),
				'users'=>array('admin'),
			),
			array('deny',  // deny all users
				'users'=>array('*'),
			),
		);
	}
	public function actionFeed()
	{
		$stream=new StreamController();
		$feed=$stream->makeStream();
		foreach ($feed as $s){
			echo "<div class='sweet ".$s['source']."clearfix'>";
			echo "<div class='avatar'><img src='".$s['avatar']."'></img></div>";
			echo "<div class='feed_content'>";
			echo "<div class='feeder_name'>".$s['user'].":</div>";
			echo "<div class='feeder_say'>".$s['content']."</div>";
			echo "<div class='feed_info'>".$s['datetime']."</div>";
			echo "</div></div>";
		}
		
		
	}
	public function actionGetReply(){
		
	}

	// Uncomment the following methods and override them if needed
	/*
	public function filters()
	{
		// return the filter configuration for this controller, e.g.:
		return array(
			'inlineFilterName',
			array(
				'class'=>'path.to.FilterClass',
				'propertyName'=>'propertyValue',
			),
		);
	}

	public function actions()
	{
		// return external action classes, e.g.:
		return array(
			'action1'=>'path.to.ActionClass',
			'action2'=>array(
				'class'=>'path.to.AnotherActionClass',
				'propertyName'=>'propertyValue',
			),
		);
	}
	*/
}